<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css">
    <script src="../node_modules/jquery/dist/jquery.js"></script>

    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        .head {
            width: 100%;
            height: 60px;
            background: #1f262d;
        }
        
        .head h4 {
            color: #A4D3EE;
            font-weight: 900;
            line-height: 60px;
            margin-left: 28px;
        }
        
        .main {
            width: 100%;
            height: 0;
            background: none repeat scroll 0 0 #eeeeee;
        }
        
        .left {
            width: 15%;
            height: 100%;
            background: #2E363F;
            color: #939da8;
            float: left;
        }
        
        .right {
            width: 85%;
            height: 100%;
            float: left;
        }
        
        .right iframe {
            width: 100%;
            height: 100%;
        }
        
        .list-se {
            display: none;
        }
        
        .list-se p {
            height: 36px;
            line-height: 36px;
            color: #939da8;
            background: #1f262d;
            margin-bottom: 0px;
            padding-left: 12px;
        }
        
        .lis {
            border-top: 1px solid #37414b;
            border-bottom: 1px solid #1f262d;
            font-size: 13px;
        }
        
        .title {
            width: 100%;
            height: 100%;
            display: block;
            line-height: 38px;
            margin-bottom: 0px;
            padding-left: 12px;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="head">
            <h4>Admin后台管理系统</h4>
        </div>
        <div class="main">
            <div class="left">
                <div class="list">
                    <ul>
                        <li class="lis">
                            <span class="title">表单</span>
                            <ul class='list-se'>
                                <li>
                                    <p title="./user.html">用户管理</p>
                                </li>
                                <li>
                                    <p title="./adduser.html">添加新用户</p>
                                </li>
                            </ul>
                        </li>
                        <li class="lis">
                            <span class="title">商品管理信息</span>
                            <ul class='list-se'>
                                <li>
                                    <p title="./goodlist.html">商品管理</p>
                                </li>
                                <li>
                                    <p title="./addgoods.html">添加商品</p>
                                </li>
                            </ul>
                        </li>
                        <li class="lis">
                            <span class="title">其他组件</span>
                            <ul class='list-se'>
                                <li>
                                    <p>其他</p>
                                </li>
                                <li>
                                    <p>其他</p>
                                </li>
                                <li>
                                    <p>其他</p>
                                </li>
                            </ul>
                        </li>
                        <li class="lis">
                            <span class="title">错误页面</span>
                            <ul class='list-se'>
                                <li>
                                    <p>404</p>
                                </li>
                                <li>
                                    <p>405</p>
                                </li>
                                <li>
                                    <p>406</p>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>

            </div>
            <div class="right">
                <iframe src="./user.html" frameborder="0"></iframe>
            </div>
        </div>
    </div>
    <script>
        $(".main").height($(window).outerHeight() - 60);
        $(".list").on("click", ".title", function() {

            $(this).next(".list-se").slideToggle(300);
        })
        $(".list").on("mouseenter", ".title", function() {
            $(this).css({
                "background": "#08c",
                "color": "#fff"
            })
        })
        $(".list").on("mouseleave", ".title", function() {
            $(this).css({
                "background": "#2E363F",
                "color": "#939da8"
            })
        })
        $(".list").on("mouseenter", "p", function() {
            $(this).css({
                "background": "#58bc58",
                "color": "#fff"
            })
        })
        $(".list").on("mouseleave", "p", function() {
            $(this).css({
                "background": "#1f262d",
                "color": "#939da8"
            })
        })
        $(".list").on("click", "p", function() {

            $("iframe").attr('src', $(this).attr('title'))


        })
    </script>
</body>

</html>